﻿<a name="top" id="top"></a>
<style type="text/css">
    form
    {
        margin: 0px;
        padding: 0px;
    }
</style>
<table width="100%" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td>
                <div class="banner">
                    <div style="float: right; padding: 10px 10px 0px 0px;">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="bar" style="height: 24px;">
				<form action="Default.asp" method="get">
				<input type="hidden" name="act" value="category"/>
				<input type="hidden" name="mode" value="search"/>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        
                        
                        <tbody>
                            <tr>
                                <td style="padding: 3px; text-align: left;" valign="middle" align="left">
									<%
									
									sSQL = "select c.* , mi.url from category as c inner join menuitem as mi on c.id = mi.categoryid where c.isdeleted =0 and mi.menuid=1"
									Set rs = DBLayer.GetRecordSet(sSQL)
									If rs.RecordCount <> 0 Then
										While Not rs.EOF
									%>
										 <a  href="<%If rs("url").Value <> "" Then Response.Write(rs("url").Value) Else Response.Write("Default.asp?act=category&id=" & rs("id").Value) End If%> "><strong><font color="#ffffff"
                                        face="Verdana, Arial, Helvetica, sans-serif" size="1"><%Response.Write(rs("name").Value) %></font></strong></a>
										
									<%
											
										rs.MoveNext
										if Not rs.EOF then %>
										<span style="font-size: 7pt; color: rgb(255, 255, 255); font-family: Verdana;"><strong> | </strong></span>
										<% end if 
											
										Wend
									End If
									
									%>
                                                 
                                </td>
                                <td style="width: 10px;">
                                </td>
                                <td style="width: 120px;" valign="middle" align="left">
                                    <input id="query" name="query" style="width: 120px;" onfocus="kw_t()" onblur="kw_t()"
                                        value="Từ khóa" type="text">
                                </td>
                                <td style="width: 80px;" valign="middle" align="left">
                                    <input onclick="return kw_chk()" style="width: 80px;" value="Tìm kiếm" type="submit">

                                    <script type="text/javascript">
                function kw_t(){
                    txt = document.getElementById('query');
                    if(txt.value=='' || txt.value==null){
                        txt.value='Từ khóa';
                    }
                    else if(txt.value=='Từ khóa'){
                        txt.value='';
                    }
                    
                }
                function kw_chk(){
                    txt = document.getElementById('query');
                    if(txt.value=='' || txt.value=='Từ khóa'){
                       alert('Mời bạn nhập từ khóa'); return false;
                    }
                    else
                        return true;
                }
                                    </script>

                                </td>
                            </tr>
                        </tbody>
                    </table>
					</form>
                </div>
            </td>
        </tr>
    </tbody>
</table>
<form>
<a name="top" id="top"></a>
</form>
